From cda3b1a084765408de49b5f6188a7068d10e0e58 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 29 May 2007 06:12:54 +0000 Subject: [PATCH] (table--point-entered-cell-function) (table--point-left-cell-function): Bind `inhibit-point-motion-hooks' to t. --- lisp/textmodes/table.el | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index c0a85eeb68c..69c3c60f912 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -5333,21 +5333,25 @@ instead of the current buffer and returns the OBJECT." (defun table--point-entered-cell-function (&optional old-point new-point) "Point has entered a cell. Refresh the menu bar." - (unless table-cell-entered-state - (setq table-cell-entered-state t) - (setq table-mode-indicator t) - (force-mode-line-update) - (table--warn-incompatibility) - (run-hooks 'table-point-entered-cell-hook))) + ;; Avoid calling point-motion-hooks recursively. + (let ((inhibit-point-motion-hooks t)) + (unless table-cell-entered-state + (setq table-cell-entered-state t) + (setq table-mode-indicator t) + (force-mode-line-update) + (table--warn-incompatibility) + (run-hooks 'table-point-entered-cell-hook)))) (defun table--point-left-cell-function (&optional old-point new-point) "Point has left a cell. Refresh the menu bar." - (when table-cell-entered-state - (setq table-cell-entered-state nil) - (setq table-mode-indicator nil) - (force-mode-line-update) - (run-hooks 'table-point-left-cell-hook))) + ;; Avoid calling point-motion-hooks recursively. + (let ((inhibit-point-motion-hooks t)) + (when table-cell-entered-state + (setq table-cell-entered-state nil) + (setq table-mode-indicator nil) + (force-mode-line-update) + (run-hooks 'table-point-left-cell-hook)))) (defun table--warn-incompatibility () "If called from interactive operation warn the know incompatibilities. -- 2.30.2